﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Resources;
using System.Globalization;

namespace WLS
{
    public partial class About : Form
    {
        all_setting p;
        public About(ref all_setting _jazyk)
        {
            InitializeComponent();
            p = _jazyk;
            p.JazykZmenen += new all_setting.ZmenaJazyku(jazyk_JazykZmenen);
            jazyk_JazykZmenen(p.jazyk);
        }
        /// <summary>
        /// Změní jazyk
        /// </summary>
        /// <param name="jazyk"></param>
        void jazyk_JazykZmenen(string jazyk)
        {
            CultureInfo cultura = CultureInfo.CreateSpecificCulture(jazyk);
            ResourceManager manager = new ResourceManager("WLS.Res", typeof(Form1).Assembly);
            label1.Text = manager.GetString("ramba", cultura);
            label3.Text = manager.GetString("kovacic", cultura);
            label4.Text = manager.GetString("hak", cultura);
            label5.Text = manager.GetString("dolecek", cultura);
            label6.Text = manager.GetString("guranyi", cultura);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}